package com.matt.repository.teaching;

import com.matt.domain.teaching.CourseAreaPublic;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/1/26
 * *******************************
 */
public interface CourseAreaPublicRepository extends JpaRepository<CourseAreaPublic, String>, JpaSpecificationExecutor<CourseAreaPublic> {

    List<CourseAreaPublic> findByTypeNameAndAreaIdAndDeletedAndStatus(String typeName, String areaId, Boolean deleted, Integer status);
    List<CourseAreaPublic> findByTypeNameAndAreaIdAndDeletedAndStatusNot(String typeName, String areaId, Boolean deleted, Integer status);

    List<CourseAreaPublic> findByAreaIdAndDeletedAndStatusNot(String areaId, Boolean deleted, Integer status);

    CourseAreaPublic findByCourseAreaId(String courseAreaId);

}
